<!DOCTYPE html>
<html lang="en">
<head>
    <title>swarmpit</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
    <meta name="description" content="Lightweight Docker Swarm management UI">
    <meta name="theme-color" content="#65519f">
    <link rel="apple-touch-icon" sizes="180x180" href="icon/apple-touch-icon.png?v=2">
    <link rel="icon" type="image/png" sizes="32x32" href="icon/favicon-32x32.png?v=2">
    <link rel="icon" type="image/png" sizes="16x16" href="icon/favicon-16x16.png?v=2">
    <link rel="mask-icon" href="icon/safari-pinned-tab.svg?v=2" color="#5bbad5">
    <link rel="manifest" href="manifest.json">
    <link rel="stylesheet" href="css/rc-slider.css" type="text/css">
    <link rel="stylesheet" href="css/codemirror.css" type="text/css">
    <link rel="stylesheet" href="css/codemirror-lint.css" type="text/css">
</head>
<body>
<div id="layout">
</div>
<div id="message">
</div>
<div id="progress">
</div>
<script>
    window.isUpdateAvailable = new Promise(function (resolve, reject) {
        if ("serviceWorker" in navigator && ["localhost", "127"].indexOf(location.hostname) === -1) {
            window.addEventListener("load", function () {
                navigator.serviceWorker.register("sw.js").then(function (registration) {
                    console.log("ServiceWorker registration successful with scope: ", registration.scope);
                    registration.onupdatefound = function () {
                        var installingWorker = registration.installing;
                        installingWorker.onstatechange = function () {
                            switch (installingWorker.state) {
                                case "installed":
                                    if (navigator.serviceWorker.controller) {
                                        resolve(registration);
                                    } else {
                                        resolve(false);
                                    }
                                    break;
                            }
                        }
                    }
                }).catch(function (err) {
                    console.log("ServiceWorker registration failed: ", err);
                    reject(err);
                });
            });
        }
    });
</script>
</body>
</html>
